#!/usr/bin/env python
PACKAGE='op3_camera_setting_tool'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#           Name                            , Type      , Reconfiguration level     , Description                   , Default   , Min   , Max
gen.add("brightness"                        , int_t     , 0                         , "Brightness"                  , 128       , 0     , 255)
gen.add("contrast"                          , int_t     , 0                         , "Contrast"                    , 128       , 0     , 255)
gen.add("saturation"                        , int_t     , 0                         , "Saturation"                  , 128       , 0     , 255)
gen.add("sharpness"                         , int_t     , 0                         , "Sharpness"                   , 128       , 0     , 255)
gen.add("gain"                              , int_t     , 0                         , "Gain"                        , 0         , 0     , 255)
gen.add("focus_auto"                        , bool_t    , 0                         , "Auto focus"                  , False)
gen.add("focus_absolute"                    , int_t     , 0                         , "Absolute Focus"              , -1        , -1    , 255)
exposure_auto_enum = gen.enum([ gen.const("auto"                , int_t, 0, "Exposure Auto"),
                                gen.const("manual"              , int_t, 1, "Exposure Manual"),
                                gen.const("shutter_priority"    , int_t, 2, "Exposure : Shutter priority"),
                                gen.const("aperture_priority"   , int_t, 3, "Exposure : Aperture priority")],
                                "An enum to set size")
gen.add("exposure_auto"                     , int_t     , 0                         , "Auto Exposure"               , 3         , 0     , 3     , edit_method=exposure_auto_enum)
gen.add("exposure_absolute"                 , int_t     , 0                         , "Absolute Exposure"           , 80        , 0     , 255)
gen.add("white_balance_temperature_auto"    , bool_t    , 0                         , "Auto White Balance"          , True)
gen.add("white_balance_temperature"         , int_t     , 0                         , "White Balance Temperature"   , 4000      , 2000  , 6500)

exit(gen.generate(PACKAGE, "op3_camera_setting_tool", "CameraParams"))
